<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>Hello MUI</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<!--标准mui.css-->
		<link rel="stylesheet" href="../css/mui.min.css">
		<!--App自定义的css-->
		<!--<link rel="stylesheet" type="text/css" href="../css/app.css"/>-->
	</head>
	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">二级列表</h1>
		</header>
		
		<div class="mui-content">
			<div class="mui-card">
				<ul class="mui-table-view mui-table-view-chevron">
					<li class="mui-table-view-cell">card（圆角列表）
						<div id="M_Toggle" class="mui-switch mui-active">
							<div class="mui-switch-handle"></div>
						</div>
					</li>
					<li class="mui-table-view-cell mui-collapse"><a class="mui-navigate-right" href="#">产品</a>
						<ul class="mui-table-view mui-table-view-chevron">
							<li class="mui-table-view-cell"><a class="mui-navigate-right" href="#">iOS</a>
							</li>
							<li class="mui-table-view-cell"><a class="mui-navigate-right" href="#">Android</a>
							</li>
							<li class="mui-table-view-cell"><a class="mui-navigate-right" href="#">HTML5</a>
							</li>
						</ul>
					</li>
					<li class="mui-table-view-cell mui-collapse"><a class="mui-navigate-right" href="#">方案</a>
						<ul class="mui-table-view mui-table-view-chevron">
							<li class="mui-table-view-cell"><a class="mui-navigate-right" href="#">PC方案</a>
							</li>
							<li class="mui-table-view-cell"><a class="mui-navigate-right" href="#">手机方案</a>
							</li>
							<li class="mui-table-view-cell"><a class="mui-navigate-right" href="#">TV方案</a>
							</li>
						</ul>
					</li>
					<li class="mui-table-view-cell mui-collapse"><a class="mui-navigate-right" href="#">新闻</a>
						<ul class="mui-table-view mui-table-view-chevron">
							<li class="mui-table-view-cell"><a class="mui-navigate-right" href="#">公司新闻</a>
							</li>
							<li class="mui-table-view-cell"><a class="mui-navigate-right" href="#">行业新闻</a>
							</li>
						</ul>
					</li>
				</ul>
			</div>
		</div>
	</body>
	<script src="../js/mui.min.js"></script>
	<script>
		mui.init({
			swipeBack:true //启用右滑关闭功能
		});
		window.addEventListener('toggle', function(event) {
			if (event.target.id === 'M_Toggle') {
				var isActive = event.detail.isActive;
				var table = document.querySelector('.mui-table-view');
				var card = document.querySelector('.mui-card');
				if (isActive) {
					card.appendChild(table);
					card.style.display = '';
				} else {
					var content = document.querySelector('.mui-content');
					content.insertBefore(table, card);
					card.style.display = 'none';
				}
			}
		});
	</script>
</html>